package com.rfsp.mcp.mapper;

import java.util.Date;
import java.util.List;

import com.rfsp.mcp.pojo.dto.MiPayLogDTO;
import com.rfsp.mcp.pojo.sdto.MiPayLogSDTO;
import com.rfsp.mcp.pojo.vo.MiAccountVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.rfsp.common.base.BaseMapper;
import com.rfsp.mcp.pojo.po.MiPayLogPO;
import com.rfsp.mcp.pojo.vo.MiPayLogVO;
import org.springframework.stereotype.Repository;

@Repository
public interface MiPayLogMapper extends BaseMapper<MiPayLogPO> {
	
	@Select("SELECT * FROM MCP_MI_PAY_LOG WHERE AUTH_ID = #{authId} ORDER BY ID DESC")
	List<MiPayLogVO> selectVOByAuthId(@Param("authId") Long authId);


	List<MiPayLogVO> get(MiPayLogSDTO sdto);

    Integer getZTSearchSuccessCount(@Param("startDate") String startDate,@Param("endDate") String endDate,
									@Param("queryOrgId") Long queryOrgId,@Param("targetOrgId") Long targetOrgId,@Param("orgYbjId") Long orgYbjId);

	Integer getYBZHSearchSuccessCount(@Param("startDate") String startDate,@Param("endDate") String endDate,
									  @Param("queryOrgId") Long queryOrgId,@Param("targetOrgId") Long targetOrgId,@Param("orgYbjId") Long orgYbjId);

	Integer getJSMXSearchSuccessCount(@Param("startDate") String startDate,@Param("endDate") String endDate,
									  @Param("queryOrgId") Long queryOrgId,@Param("targetOrgId") Long targetOrgId,@Param("orgYbjId") Long orgYbjId);

	String getLDJGCountLimit();

	String getZJFCountLimit();

	MiAccountVO findMiAccountVOByPayLogId(Long id);

    MiPayLogVO findLastOne(@Param("miPayLogVO") MiPayLogVO miPayLogVO);
}